import request from '@/utils/request'

// 查询学员通知列表
export function listStudentNotice(query) {
  return request({
    url: '/training/studentNotice/list',
    method: 'get',
    params: query
  })
}

// 查询学员通知详细
export function getStudentNotice(studentNoticeId) {
  return request({
    url: '/training/studentNotice/' + studentNoticeId,
    method: 'get'
  })
}

// 新增学员通知
export function addStudentNotice(data) {
  return request({
    url: '/training/studentNotice',
    method: 'post',
    data: data
  })
}

// 修改学员通知
export function updateStudentNotice(data) {
  return request({
    url: '/training/studentNotice',
    method: 'put',
    data: data
  })
}

// 删除学员通知
export function delStudentNotice(studentNoticeId) {
  return request({
    url: '/training/studentNotice/' + studentNoticeId,
    method: 'delete'
  })
}

// 学员通知处理
export function studentNoticeProcess(data) {
  return request({
    url: '/training/studentNotice/send' ,
    method: 'post',
    data:data
  })
}

// 通过班级id查询通知详情
export function listNoticeByClassId(trainingClassId) {
  return request({
    url: '/training/studentNotice/listByClassId/'+ trainingClassId,
    method: 'get'
  })
}
